package servlet;

import bean.back.listpark.BackListparkBean;
import util.DealParams;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Map;

@WebServlet("/back/listpark")
public class BackListparkServlet extends HttpServlet{
    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.setCharacterEncoding("utf-8");
        Map<String,String> params = DealParams.getParamsMap(req);
        PrintWriter out = resp.getWriter();
        String token = params.get("token");
        BackListparkBean bean = new BackListparkBean();
        out.print(bean.queryPark(token));
    }
}
